-module(all_ptc).

-export([write/0]).

-define(max_a,"A002"). %%登陆协议
-define(max_b,"D013"). %%公共协议
-define(max_c,"B006"). %%房间协议
-define(max_wm,"D204"). %%wm

get_list() ->
	[
	 ptc_public_class,
	 ptc_login,
	 ptc_info,
	 ptc_action,	 
	 ptc_action_int,
	 ptc_action_float,
	 ptc_action_string,
	 ptc_action_two_int,
	 ptc_action_three_int,
	 ptc_net_chg_code,
	 ptc_ping,
	 ptc_create_zzmj,
	 ptc_create_csmj,
	 ptc_room_created,
	 ptc_room_joined,
	 ptc_wait_info,
	 ptc_game_start,
	 ptc_game_continue_out,
	 ptc_game_continue_action,
	 ptc_game_continue_in,
	 ptc_game_finish,
	 ptc_create_jd_sg,
	 ptc_create_swsg,
	 ptc_create_jhsg,
	 ptc_sg_card_info,
	 ptc_update_sg_prepare_state,
	 ptc_update_sg_zhuang,
	 ptc_update_sg_xiazhu_score,
	 ptc_update_sg_jie_suan_score,
	 ptc_sg_fighting_record_info,
	 ptc_sg_everytimes_fighting_info,
	 ptc_jinhua_card_info,
	 ptc_group_list
	].

write() ->
	case file:open("./include_pt/pt.hrl", [write]) of
		{ok, RdFile} ->
			List = get_list(),
			Fun = fun(Module) ->  Module:write(RdFile),io:format("~p write ok!!~n", [Module]) end,
			lists:foreach(Fun, List),
			file:close(RdFile);
		R -> R
	end.
